<<<<<<< HEAD
<?php
if (! defined ( 'BASEPATH' ))
	exit ( 'No direct script access allowed' );

class Reg extends MY_Controller {
	
	function __construct() {
		parent::__construct ();
	/** 登陆验证 */
	}
	
	/**
	 * 用户注册
	 */
	function index() {
		if ($this->input->post ( 'act' ) == 'reg') {
			$ret = array ('msg' => '', 'sycDz' => '', 'data' => array ('url' => '' ) );
			$this->load->model ( 'User_model', 'user' );
			$invite = trim ( $this->input->post ( 'invite' ) );
			if($invite ==""){
			}else{
				$invite_info = $this->user->get_one ( array ('user_id' => $invite ), 'user_id' );
			}
			$invite_userid = 0;
			if ($invite_info) {
				$invite_userid = $invite_info ['user_id'];
			}
			$pw = $this->input->post ( 'password' );
			$data = array ('username' => trim ( $this->input->post ( 'phones' ) ),'password' => md5 ( md5 ( $pw ) ), 'phone' => trim ( $this->input->post ( 'phones' ) ), 'invite_userid' => intval ( $invite_userid ), 
			 'type_id' => '2', 'add_time' => time (), 'addip' => $this->input->ip_address ());
			if (  strlen($pw)<8 || strlen($pw)>16){
				$ret ['msg'] = '密码长度不合法，8至16之间';
				echo json_encode ( $ret );
				exit ();
			}elseif ($pw == "" || !$this->myformcheck->isName($pw) ) {
				$ret ['msg'] = '无效密码，必须含有数字+字母，其中只允许~!#$^&?_字符';
				echo json_encode ( $ret );
				exit ();
			} elseif (! $this->myformcheck->isPhone ( $data ['phone'] )) {
				$ret ['msg'] = '请填写有效的手机号码'. $data ['phone'] ;
				echo json_encode ( $ret );
				exit ();
			} elseif ($this->input->post ( 'agr' ) != 1) {
				$ret ['msg'] = '需阅读并同意隐私及服务条款';
				echo json_encode ( $ret );
				exit ();
			}

			
			//添加注册信息到用户表
			$data["phone_status"] = 1;
			$user_id = $this->user->add ( $data );
			if ($user_id) {
				//发送邮件
				//$res = $this->notice_email ( $user_id );
				
				//添加注册积分日志并修改积分
				//$this->notice_credit( $user_id, 'reg' );
				
				//手机积分日志
				//$this->notice_credit ( $user_id, 'phone' );
				
				//初始化资金账号
				$this->load->model('Account_model', 'redaccount');
				$initAccount = array('user_id'  => $user_id,'total'=> '0','use_money'=>'0','no_use_money' =>'0','collection'=> '0','red_money'=>'0');
				$this->redaccount->init_account($initAccount);
				
				//发放代金券
				$this->load->model('Redmanagement_model', 'redmanagement');
				$this->redmanagement->send_red($user_id,1,"注册");
				
				$this->send_msg(array('user_id'=>$user_id,'sys_id'=>28));//发送注册成功
				if($invite_userid > 0){
					//发放代金券
					$this->redmanagement->send_red($invite_userid,10,"好友邀请".$user_id);
				}
			
				//注册成功自动登陆
				$user = array ('user_id' => $user_id, 'username' => $data ['username'], 'email' => $data ['email'], 'login_time' => time (),'phone'=>$data ['phone'] );
				$this->session->set_userdata ( 'rsh_user', $user );
				$ret ['data'] ['url'] = '/user/zhs_realname';
				echo json_encode ( $ret );
				exit ();
			} else {
				$ret ['msg'] = '注册失败';
				echo json_encode ( $ret );
				exit ();
			}
		
		} else {
			if (isset ( $_COOKIE ['inviteRequest'] ) && $_COOKIE ['inviteRequest']) {
				$inviteRequest = $_COOKIE ['inviteRequest'];
				$data ['invite'] = $inviteRequest;
			}
			elseif(isset($_GET["invite"])){
				$inviteRequest = $_GET["invite"];
				setcookie("inviteRequest",$inviteRequest, time()+3600);
				$data ['invite'] = $inviteRequest;
			}
			
			$data ['title'] = "用户注册" . ' - ' . CON_KEYWORDS;
			$this->load->view ( 'user/zhs_user_reg', $data );
		}
	}
	
	/**
	 * 注册邮箱激活
	 */
	function activation() {
		$this->load->model ( 'User_model', 'user' );
		
		//获取加密字符串并解密
		$this->load->library ( 'func' );
		$act = $this->input->get ( 'act' );
		$str = $this->func->authcode ( $act, "DECODE" );
		$arr = explode ( ',', $str );
		if (count ( $arr ) == 4) {
			$user_id = $arr [0];
			$username = $arr [1];
			$email = $arr [2];
			$row = $this->user->get_one ( array ('user_id' => $user_id ), 'username,email,email_status' );
			if ($row && $row ['username'] == $username && $row ['email'] == $email) {
				if ($row ['email_status'] != 1) {
					$update = array ('email_status' => 1 );
					$res = $this->user->update ( $update, array ('user_id' => $user_id ) );
					if ($res) {
						//发放代金券
						$this->load->model('Redmanagement_model', 'redmanagement');
						$this->redmanagement->send_red($user_id,3,"邮箱认证");
						$this->send_msg(array('user_id'=>$user_id,'sys_id'=>29,'email'=>$email));//发送注册邮箱激活成功
						$data ['succ'] = '1';
						$data ['msg'] = '邮箱认证成功';
					}
				} else {
					$data ['msg'] = '该邮箱账户已认证';
				}
			
			} else {
				$data ['msg'] = '错误数据';
			}
		} else {
			$data ['msg'] = '错误数据';
		}
		
		$this->load->view ( 'user/zhs_user_email', $data );
	}
	
	/*
	 *注册手机验证码发送 
	 * */
	public function apply_phone() {
		$this->load->model ( 'User_model', 'user' );
		$ret = array ('msg' => '', 'url' => '' );
		$k = md5 ( 'zhsjr' );
		
		$captcha = $this->input->post ( 'captcha' );
		if ($captcha =="" ){
			$ret['msg'] = '请输入验证码';
			echo json_encode($ret);exit;
		}elseif ($captcha != $_SESSION['captcha']){
			$ret['msg'] = '您输入的验证码不正确';
			echo json_encode($ret);exit;
		}
		else $_SESSION['captcha']="";
		
		if (isset ( $_COOKIE [$k] ) && $_COOKIE [$k] == 1) {
			$ret ['msg'] = '限制3分钟内获取多次次短信验证码，请稍后再试';
			echo json_encode ( $ret );
			exit ();
		} else {
			
			$phone = $this->input->post ( 'phone' );
			if (! $phone) {
				$ret ['msg'] = '请填写手机号码';
			} elseif (! $this->myformcheck->isPhone ( $phone )) {
				$ret ['msg'] = '请填写有效的手机号码';
			} else {
				//验证手机号码是否存在
				$tmpwhere = array ('phone' => $phone );
				$row = $this->user->get_one ( $tmpwhere, 'user_id' );
				if (isset ( $row ['user_id'] )) {
					$ret ['msg'] = '手机号码已存在';
				}
			
			}
			if ($ret ['msg']) {
				echo json_encode ( $ret );
				exit ();
			}
			
			$ctime = time () + 3 * 60; //限制3分钟内获取多次次短信验证码
			setcookie ( $k, 1, $ctime);
			
			$md5 = rand_string ( $phone, 5, 3, 13 );		
			$msg = "尊敬的客户，您的手机验证码为：" . $md5;	
			$this->load->library ( 'phone' );
			$res = $this->phone->send($phone ,$msg );
			if ($res == '0') {
				$this->session->set_userdata ( $phone, $md5 );
				$ret ['info'] = '1';
			} else {
				$ret ['msg'] = '手机短信发送失败【'.$res.'】，请稍后再试';
			}
			echo json_encode ( $ret );
			exit ();
		
		}
	
	}
	
	
	public function check_email() { //邮箱是否存在
		$this->load->model ( 'User_model', 'user' );
		$ret = array ('msg' => '', 'exist' => '0' );
		$email = trim ( $this->input->post ( 'email' ) );
		
		if ($this->user->get_one ( array ('email' => $email ), 'user_id' )) {
			$ret ['msg'] = '邮箱已被使用';
			$ret ['exist'] = '1';
		}
		echo json_encode ( $ret );
		exit ();
	}
	
	public function check_name() { //会员昵称是否存在
		$this->load->model ( 'User_model', 'user' );
		$ret = array ('msg' => '', 'exist' => '0' );
		$name = trim ( $this->input->post ( 'username' ) );
		
		if ($this->user->get_one ( array ('username' => $name ), 'user_id' )) {
			$ret ['msg'] = '会员昵称已被注册';
			$ret ['exist'] = '1';
		}
		echo json_encode ( $ret );
		exit ();
	}
	
	public function check_phone() { //电话号码是否已被使用
		$this->load->model ( 'User_model', 'user' );
		$ret = array ('msg' => '', 'exist' => '0' );
		$phone = trim ( $this->input->post ( 'phone' ) );
		
		if ($this->user->get_one ( array ('phone' => $phone ), 'user_id' )) {
			$ret ['msg'] = '手机号码已被使用';
			$ret ['exist'] = '1';
		}
		echo json_encode ( $ret );
		exit ();
	}
	
	
	public function check_imgvefy() { //电话号码是否已被使用
		$captcha =$_SESSION['captcha'];
		$ret = array ('msg' => '', 'exist' => '0' );
		$imgvefy = trim ( $this->input->post ( 'imgvefy' ) );
		
		if ( $captcha != $imgvefy ) {
			$ret ['msg'] = '图片验证码有误';
			$ret ['exist'] = '1';
		}
		echo json_encode ( $ret );
		exit ();
	}
	
	
	public function check_mbyzm() { //电话号码是否已被使用
				//手机验证码!
		$verify_code = trim ( $this->input->post ( 'mbyzm' ));
		$phone  = trim ( $this->input->post ( 'phones' ) );
		
		$md5 = $this->session->userdata ($phone);
		//$md5 = 1234;
		if (isset($verify_code) && isset($md5) && !empty($verify_code) &&  !empty($md5) &&   $verify_code == $md5  ) {
			$ret ['exist'] = '0';
		}else{
			$ret ['msg'] = '手机验证码不正确';
			$ret ['exist'] = '1';
		}
		echo json_encode ( $ret );
		exit ();
	}
	
	public function check_invite() { //电话号码是否已被使用
		$this->load->model ( 'User_model', 'user' );
		$invite = trim ( $this->input->post ( 'invite' ) );
		if($invite ==""){
			$ret ['exist'] = '0';
		}else{
			$invite_info = $this->user->get_one ( array ('user_id' => $invite ), 'user_id' );
			if($invite_info){
				$ret ['exist'] = '0';
			}else{
				$ret ['msg'] = '邀请码不存在，请确认';
				$ret ['exist'] = '1';
			}
		}
		echo json_encode ( $ret );
		exit ();
	}
	
	
	/*
	 * 登陆用户操作时需要手机验证方法
	 * 
	 * */
	function sendsms() {
		$user = $this->session->userdata('rsh_user');
		$username = $this->input->post('username');
		$this->load->model ( 'User_model', 'user' );
		if($username && !$user){
			$user_id = $this->user->get_userid_by_username($username);
			if($user_id) $user =  $this->user->get_realname_by_id($user_id);
			$this->session->set_userdata ('zhs_phone', $user ['phone']);
		}
		if (isset($user['user_id'])) {
			$k = md5 ( 'zhsjr_sms' );
			if (isset ( $_COOKIE [$k] ) && $_COOKIE [$k] == '1') {
				$ret ['msg'] = '限制3分钟内获取多次次短信验证码，请稍后再试';
				//echo json_encode ( $ret );
				//exit ();
			}
			$ctime = time () + 3 * 60; //限制3分钟内获取多次次短信验证码
			setcookie ( $k, 1, $ctime);
		//var_dump($user);	
			$this->load->library ( 'phone' );
			$smscode = rand_string ( $user ['phone'], 5, 3, 13 );
			$msg = "手机验证码为：" . $smscode;
			$res = $this->phone->send ( $user ['phone'], $msg );

			if ($res == '0') {
				$this->user->update ( array ('smscode' => $smscode, 'smstime' => time () ), array ('user_id' => $user['user_id'] ) );
				$this->session->set_userdata ( $user ['phone'], $smscode);
				
				$ret ['info'] = '1';
			} else {
				$ret ['msg'] = '手机短信发送失败，请稍后再试';
			}
		}else $ret ['msg'] = '会员昵称不存在';
		echo json_encode ( $ret );
		exit ();
	}
}
=======
<?php
if (! defined ( 'BASEPATH' ))
    exit ( 'No direct script access allowed' );

class Reg extends MY_Controller {
	
	function __construct() {
		parent::__construct ();
	/** 登陆验证 */
	}
	
	/**
	 * 用户注册
	 */
	function index() {
		if ($this->input->post ( 'act' ) == 'reg') {
			$ret = array ('msg' => '', 'sycDz' => '', 'data' => array ('url' => '' ) );
			$this->load->model ( 'User_model', 'user' );
			$invite = trim ( $this->input->post ( 'invite' ) );
			if($invite ==""){
			}else{
				$invite_info = $this->user->get_one ( array ('user_id' => $invite ), 'user_id' );
			}
			$invite_userid = 0;
			if ($invite_info) {
				$invite_userid = $invite_info ['user_id'];
			}
			$pw = $this->input->post ( 'password' );
			$data = array ('username' => trim ( $this->input->post ( 'phones' ) ),'password' => md5 ( md5 ( $pw ) ), 'phone' => trim ( $this->input->post ( 'phones' ) ), 'invite_userid' => intval ( $invite_userid ), 
			 'type_id' => '2', 'add_time' => time (), 'addip' => $this->input->ip_address ());
			if (  strlen($pw)<8 || strlen($pw)>16){
				$ret ['msg'] = '密码长度不合法，8至16之间';
				echo json_encode ( $ret );
				exit ();
			}elseif ($pw == "" || !$this->myformcheck->isName($pw) ) {
				$ret ['msg'] = '无效密码，必须含有数字+字母，其中只允许~!#$^&?_字符';
				echo json_encode ( $ret );
				exit ();
			} elseif (! $this->myformcheck->isPhone ( $data ['phone'] )) {
				$ret ['msg'] = '请填写有效的手机号码'. $data ['phone'] ;
				echo json_encode ( $ret );
				exit ();
			} elseif ($this->input->post ( 'agr' ) != 1) {
				$ret ['msg'] = '需阅读并同意隐私及服务条款';
				echo json_encode ( $ret );
				exit ();
			}

			
			//添加注册信息到用户表
			$data["phone_status"] = 1;
			$user_id = $this->user->add ( $data );
			if ($user_id) {
				//发送邮件
				//$res = $this->notice_email ( $user_id );
				
				//添加注册积分日志并修改积分
				//$this->notice_credit( $user_id, 'reg' );
				
				//手机积分日志
				//$this->notice_credit ( $user_id, 'phone' );
				
				//初始化资金账号
				$this->load->model('Account_model', 'redaccount');
				$initAccount = array('user_id'  => $user_id,'total'=> '0','use_money'=>'0','no_use_money' =>'0','collection'=> '0','red_money'=>'0');
				$this->redaccount->init_account($initAccount);
				
				//发放代金券
				$this->load->model('Redmanagement_model', 'redmanagement');
				$this->redmanagement->send_red($user_id,1,"注册");
				
				$this->send_msg(array('user_id'=>$user_id,'sys_id'=>28));//发送注册成功
				if($invite_userid > 0){
					//发放代金券
					$this->redmanagement->send_red($invite_userid,10,"好友邀请".$user_id);
				}
			
				//注册成功自动登陆
				$user = array ('user_id' => $user_id, 'username' => $data ['username'], 'email' => $data ['email'], 'login_time' => time (),'phone'=>$data ['phone'] );
				$this->session->set_userdata ( 'rsh_user', $user );
				$ret ['data'] ['url'] = '/user/zhs_realname';
				echo json_encode ( $ret );
				exit ();
			} else {
				$ret ['msg'] = '注册失败';
				echo json_encode ( $ret );
				exit ();
			}
		
		} else {
			if (isset ( $_COOKIE ['inviteRequest'] ) && $_COOKIE ['inviteRequest']) {
				$inviteRequest = $_COOKIE ['inviteRequest'];
				$data ['invite'] = $inviteRequest;
			}
			elseif(isset($_GET["invite"])){
				$inviteRequest = $_GET["invite"];
				setcookie("inviteRequest",$inviteRequest, time()+3600);
				$data ['invite'] = $inviteRequest;
			}
			
			$data ['title'] = "用户注册" . ' - ' . CON_KEYWORDS;
			$this->load->view ( 'user/zhs_user_reg', $data );
		}
	}
	
	/**
	 * 注册邮箱激活
	 */
	function activation() {
		$this->load->model ( 'User_model', 'user' );
		
		//获取加密字符串并解密
		$this->load->library ( 'func' );
		$act = $this->input->get ( 'act' );
		$str = $this->func->authcode ( $act, "DECODE" );
		$arr = explode ( ',', $str );
		if (count ( $arr ) == 4) {
			$user_id = $arr [0];
			$username = $arr [1];
			$email = $arr [2];
			$row = $this->user->get_one ( array ('user_id' => $user_id ), 'username,email,email_status' );
			if ($row && $row ['username'] == $username && $row ['email'] == $email) {
				if ($row ['email_status'] != 1) {
					$update = array ('email_status' => 1 );
					$res = $this->user->update ( $update, array ('user_id' => $user_id ) );
					if ($res) {
						//发放代金券
						$this->load->model('Redmanagement_model', 'redmanagement');
						$this->redmanagement->send_red($user_id,3,"邮箱认证");
						$this->send_msg(array('user_id'=>$user_id,'sys_id'=>29,'email'=>$email));//发送注册邮箱激活成功
						$data ['succ'] = '1';
						$data ['msg'] = '邮箱认证成功';
					}
				} else {
					$data ['msg'] = '该邮箱账户已认证';
				}
			
			} else {
				$data ['msg'] = '错误数据';
			}
		} else {
			$data ['msg'] = '错误数据';
		}
		
		$this->load->view ( 'user/zhs_user_email', $data );
	}
	
	/*
	 *注册手机验证码发送 
	 * */
	public function apply_phone() {
		$this->load->model ( 'User_model', 'user' );
		$ret = array ('msg' => '', 'url' => '' );
		$k = md5 ( 'zhsjr' );
		
		$captcha = $this->input->post ( 'captcha' );
		if ($captcha =="" ){
			$ret['msg'] = '请输入验证码';
			echo json_encode($ret);exit;
		}elseif ($captcha != $_SESSION['captcha']){
			$ret['msg'] = '您输入的验证码不正确';
			echo json_encode($ret);exit;
		}
		else $_SESSION['captcha']="";
		
		if (isset ( $_COOKIE [$k] ) && $_COOKIE [$k] == 1) {
			$ret ['msg'] = '限制3分钟内获取多次次短信验证码，请稍后再试';
			echo json_encode ( $ret );
			exit ();
		} else {
			
			$phone = $this->input->post ( 'phone' );
			if (! $phone) {
				$ret ['msg'] = '请填写手机号码';
			} elseif (! $this->myformcheck->isPhone ( $phone )) {
				$ret ['msg'] = '请填写有效的手机号码';
			} else {
				//验证手机号码是否存在
				$tmpwhere = array ('phone' => $phone );
				$row = $this->user->get_one ( $tmpwhere, 'user_id' );
				if (isset ( $row ['user_id'] )) {
					$ret ['msg'] = '手机号码已存在';
				}
			
			}
			if ($ret ['msg']) {
				echo json_encode ( $ret );
				exit ();
			}
			
			$ctime = time () + 3 * 60; //限制3分钟内获取多次次短信验证码
			setcookie ( $k, 1, $ctime);
			
			$md5 = rand_string ( $phone, 5, 3, 13 );		
			$msg = "尊敬的客户，您的手机验证码为：" . $md5;	
			$this->load->library ( 'phone' );
			$res = $this->phone->send($phone ,$msg );
			if ($res == '0') {
				$this->session->set_userdata ( $phone, $md5 );
				$ret ['info'] = '1';
			} else {
				$ret ['msg'] = '手机短信发送失败【'.$res.'】，请稍后再试';
			}
			echo json_encode ( $ret );
			exit ();
		
		}
	
	}
	
	
	public function check_email() { //邮箱是否存在
		$this->load->model ( 'User_model', 'user' );
		$ret = array ('msg' => '', 'exist' => '0' );
		$email = trim ( $this->input->post ( 'email' ) );
		
		if ($this->user->get_one ( array ('email' => $email ), 'user_id' )) {
			$ret ['msg'] = '邮箱已被使用';
			$ret ['exist'] = '1';
		}
		echo json_encode ( $ret );
		exit ();
	}
	
	public function check_name() { //会员昵称是否存在
		$this->load->model ( 'User_model', 'user' );
		$ret = array ('msg' => '', 'exist' => '0' );
		$name = trim ( $this->input->post ( 'username' ) );
		
		if ($this->user->get_one ( array ('username' => $name ), 'user_id' )) {
			$ret ['msg'] = '会员昵称已被注册';
			$ret ['exist'] = '1';
		}
		echo json_encode ( $ret );
		exit ();
	}
	
	public function check_phone() { //电话号码是否已被使用
		$this->load->model ( 'User_model', 'user' );
		$ret = array ('msg' => '', 'exist' => '0' );
		$phone = trim ( $this->input->post ( 'phone' ) );
		
		if ($this->user->get_one ( array ('phone' => $phone ), 'user_id' )) {
			$ret ['msg'] = '手机号码已被使用';
			$ret ['exist'] = '1';
		}
		echo json_encode ( $ret );
		exit ();
	}
	
	
	public function check_imgvefy() { //电话号码是否已被使用
		$captcha =$_SESSION['captcha'];
		$ret = array ('msg' => '', 'exist' => '0' );
		$imgvefy = trim ( $this->input->post ( 'imgvefy' ) );
		
		if ( $captcha != $imgvefy ) {
			$ret ['msg'] = '图片验证码有误';
			$ret ['exist'] = '1';
		}
		echo json_encode ( $ret );
		exit ();
	}
	
	
	public function check_mbyzm() { //电话号码是否已被使用
				//手机验证码!
		$verify_code = trim ( $this->input->post ( 'mbyzm' ));
		$phone  = trim ( $this->input->post ( 'phones' ) );
		
		$md5 = $this->session->userdata ($phone);
		//$md5 = 1234;
		if (isset($verify_code) && isset($md5) && !empty($verify_code) &&  !empty($md5) &&   $verify_code == $md5  ) {
			$ret ['exist'] = '0';
		}else{
			$ret ['msg'] = '手机验证码不正确';
			$ret ['exist'] = '1';
		}
		echo json_encode ( $ret );
		exit ();
	}
	
	public function check_invite() { //电话号码是否已被使用
		$this->load->model ( 'User_model', 'user' );
		$invite = trim ( $this->input->post ( 'invite' ) );
		if($invite ==""){
			$ret ['exist'] = '0';
		}else{
			$invite_info = $this->user->get_one ( array ('user_id' => $invite ), 'user_id' );
			if($invite_info){
				$ret ['exist'] = '0';
			}else{
				$ret ['msg'] = '邀请码不存在，请确认';
				$ret ['exist'] = '1';
			}
		}
		echo json_encode ( $ret );
		exit ();
	}
	
	
	/*
	 * 登陆用户操作时需要手机验证方法
	 * 
	 * */
	function sendsms() {
		$user = $this->session->userdata('rsh_user');
		$username = $this->input->post('username');
		$this->load->model ( 'User_model', 'user' );
		if($username && !$user){
			$user_id = $this->user->get_userid_by_username($username);
			if($user_id) $user =  $this->user->get_realname_by_id($user_id);
			$this->session->set_userdata ('zhs_phone', $user ['phone']);
		}
		if (isset($user['user_id'])) {
			$k = md5 ( 'zhsjr_sms' );
			if (isset ( $_COOKIE [$k] ) && $_COOKIE [$k] == '1') {
				$ret ['msg'] = '限制3分钟内获取多次次短信验证码，请稍后再试';
				echo json_encode ( $ret );
				exit ();
			}
			$ctime = time () + 3 * 60; //限制3分钟内获取多次次短信验证码
			setcookie ( $k, 1, $ctime);
			
			$this->load->library ( 'phone' );
			$smscode = rand_string ( $user ['phone'], 5, 3, 13 );
			$msg = "手机验证码为：" . $smscode;
			$res = $this->phone->send ( $user ['phone'], $msg );
			if ($res == '0') {
				$this->user->update ( array ('smscode' => $smscode, 'smstime' => time () ), array ('user_id' => $user['user_id'] ) );
				$this->session->set_userdata ( $user ['phone'], $smscode);
				
				$ret ['info'] = '1';
			} else {
				$ret ['msg'] = '手机短信发送失败，请稍后再试';
			}
		}else $ret ['msg'] = '会员昵称不存在';
		echo json_encode ( $ret );
		exit ();
	}
}
>>>>>>> d47623b610d79a4eeb489500830c00d70933f414
